#include "widget.h"
#include "ui_widget.h"
#include <QResizeEvent>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QRect rect = this->geometry();
    ui->label->setGeometry(0, 0, rect.width(), rect.height());
    QPixmap picture(":/1.png");
    ui->label->setPixmap(picture);
    ui->label->setScaledContents(true);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::resizeEvent(QResizeEvent *next)
{
    next->size();
    ui->label->setGeometry(0, 0, next->size().width(), next->size().height());
}

